package com.he.statemodel.state.concretestate;

import com.he.statemodel.context.WorkContext;
import com.he.statemodel.state.WorkState;

public class AfternoonState implements WorkState {
    @Override
    public void handle(WorkContext workContext) {
        if (workContext.getWorkHour() < 13) {
            System.out.println("中午到了，去吃饭！");
        } else {
            workContext.setWorkState(new EveningState());
            workContext.workhandle();
        }
    }
}
